<?php

namespace app\common\validate\Product;
use think\Validate;

class Type extends Validate
{
    // 验证规则
    protected $rule = [
        /* 
            require => 字段必填
            regex => 正则验证
            unique => 验证字段值在指定表或模型是否为唯一 
        */
        'name' => ['require'],
        'weigh' => ['require']

    ];

    // 错误提示信息
    protected $message = [
        'name.require' => '分类名称必填',
        'weigh.require' => '权重必填'
    ];

    // 验证场景
    protected $scene = [
    ];
}
